<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_base_user_info".
 *
 * @property string $id
 * @property string $user_id 用户id（对应用户中心）
 * @property string $username 用户名
 * @property string $pet_name 用户名称
 * @property string $role 类型
 * @property string $email 邮箱
 * @property string $tel 用户电话
 * @property string $gender 性别
 * @property string $birthday 生日
 * @property string $school 学校
 * @property string $province 省
 * @property string $city 城市
 * @property string $major 专业
 * @property string $major_code 专业代号
 * @property string $create_by 创建者
 * @property string $create_time 创建日期
 * @property string $update_by 更新者
 * @property string $update_time 更新日期
 * @property int $del_flag 删除标示
 * @property string $student_no 学号
 * @property string $url_image 头像URL
 */
class TBaseUserInfo extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_base_user_info';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['user_id', 'username'], 'required'],
            [['user_id', 'major_code', 'create_by', 'update_by', 'del_flag'], 'integer'],
            [['birthday', 'create_time', 'update_time'], 'safe'],
            [['username', 'role', 'email', 'tel', 'school', 'province', 'city'], 'string', 'max' => 100],
            [['pet_name', 'gender', 'student_no'], 'string', 'max' => 64],
            [['major', 'url_image'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_id' => 'User ID',
            'username' => 'Username',
            'pet_name' => 'Pet Name',
            'role' => 'Role',
            'email' => 'Email',
            'tel' => 'Tel',
            'gender' => 'Gender',
            'birthday' => 'Birthday',
            'school' => 'School',
            'province' => 'Province',
            'city' => 'City',
            'major' => 'Major',
            'major_code' => 'Major Code',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'del_flag' => 'Del Flag',
            'student_no' => 'Student No',
            'url_image' => 'Url Image',
        ];
    }
}
